Hybris Sales UX API
TMF639 - List Resource (Device Details)
This API retrieves device details from the Assurant system based on device serial number or equipment id.
URL
https://[localhost]:[port]/ecom-sales-ux/v1/{businessId}/resourceurl Param
| name | type | description | required |
|---|---|---|---|
| businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, etc.) identifying the business unit. | Y |
Header
| name | type | description | required |
|---|---|---|---|
| client_id | string | The client_id identifying the channel. Minimum characters: 5 | Y |
| client_secret | string | Password associated with the client_id. Minimum characters: 5 | Y |
| X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
Query Param
| name | type | description | required |
|---|---|---|---|
| serialNumber | string | Serial number or IMEI of the device to be shown | Y* |
| id | string | Identifier of an instance of the resource. I.e EquipmentIdentifier | Y* |
| place.id | string | Request identifier. Expected value is "gdd" (Get Device Details) | Y |
| @type | string | Resource type. Ex : PhysicalDevice | Y |
Note : Any one of serialNumber or id is mandatory
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/ecom-sales-ux/ecom-sales-ux/v1/PR/resource?serialNumber=0123456789012345&id=99760000037632&place.id=gdd&%40type=PhysicalResource' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b' \
--header 'client_id: 12345' \
--header 'client_secret: abcde'Response
[
{
"id": "99760000037632",
"href": "https://esb-cloud-dev.lla.com/dev/assurant-sys/v1/PR/resource",
"name": "Handset",
"description": "Apple IPHONE 12 128GB",
"@type": "PhysicalResource",
"@baseType": "Resource",
"activationFeature": [
{
"name": "IPHONE 12",
"featureCharactristic": [
{
"name": "memory",
"value": "128"
}
]
}
],
"relatedParty": [
{
"name": "Apple",
"role": "Manufacturer"
}
],
"resourceCharacteristic": [
{
"name": "price",
"value": 210
},
{
"name": "carrier",
"value": "GENERIC"
},
{
"name": "color",
"value": "Black"
},
{
"name": "questions",
"valueType": "array",
"value": [
"01_POWERON_LCTI",
"02_THEFT_DISABLED_LCTI",
"03_LCDOK_LCTI",
"04_DAMFREE_LCTI"
]
}
]
}
]Definitions
| name | type | description | required |
|---|---|---|---|
| id | string | Equipment Id | Y |
| href | string | The URI for the object itself. | Y |
| name | string | A string used to give a name to the resource | N |
| description | string | Assurant equipment description | N |
| @type | string | When sub-classing, this defines the sub-class Extensible name | N |
| @baseType | string | When sub-classing, this defines the super-class | N |
| activationFeature | array | Configuration features | N |
| activationFeature.name | string | Simplified or commonly used name for the device | N |
| activationFeature.featureCharacteristic | array | This is a list of Characteristics for a particular feature | N |
| activationFeature.featureCharacteristic.name | string | Name of the characteristic | N |
| activationFeature.featureCharacteristic.value | string | Value of the characteristic | N |
| relatedParty | array | Related Entity reference. | N |
| relatedParty.name | string | Original Equipment Manufacturer of the device | N |
| relatedParty.role | string | Role played by the related party | N |
| resourceCharacteristic | array | Describes a given characteristic of an object or entity through a name/value pair. | N |
| resourceCharacteristic.name | string | Name of the characteristic | N |
| resourceCharacteristic.valueType | string | Data type of the value of the characteristic | N |
| resourceCharacteristic.value | any | Value of the characteristic | N |
resourceCharacteristic
| characteristic name | type | description |
|---|---|---|
| price | number | Good condition price for the device |
| carrier | string | Carrier to which the device could be locked |
| color | string | External device color |
| questions | array | List of strings with the triage question names |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
}]
}[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource."
}]
}[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The server could not find the requested resource.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method POST not allowed for : /resource"
}]
}[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Server Error",
"description": "The request failed due to an internal error."
}]
}[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation GET /resource for Business Id: xxxx not implemented"
}]
}